ATLAS Offline Software
ProduceDummyStripCabling.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
10 
11 #include <iostream>
12 #include <fstream>
13 #include <set>
14 #include <memory>
15 
16 static const std::string itkDictFilename{"InDetIdDictFiles/IdDictInnerDetector_ITK-P2-RUN4-03-00-00.xml"};
17 static const std::string outputFileName{"ITkStripsCabling.dat"};
18 
19 int main(){
20 
22  parser.register_external_entity("InnerDetector", itkDictFilename);
23  IdDictMgr& idd = parser.parse ("IdDictParser/ATLAS_IDS.xml");
24  auto pITkId=std::make_unique<SCT_ID>();
25  pITkId->initialize_from_dictionary(idd);
27  std::ostringstream os;
29  std::set<ITkStripOnlineId> onlineIds;
30  std::set<std::uint32_t> rodIds;
31  for(auto i = pITkId->wafer_begin();i!=pITkId->wafer_end();++i){
32  pITkId->get_expanded_id(*i,e);
33  onlineIds.insert(gen(*i));
34  rodIds.insert(gen.rod(*i));
35  os<<*i<<" "<<e<<", "<<gen(*i)<<"\n";
36  }
37  std::ofstream file(outputFileName);
38  file<<"#Wafer Identifiers,Expanded Identifiers {2/2/Bec/LayerDisk/Phi/Eta/Side/0/0} and OnlineId:\n";
39  file<<"#Version 0\n";
40  file<<os.str()<<std::endl;
41  std::cout<<"File "+outputFileName+" has been created.\n";
42 
43 
44  return 0;
45 }
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
python.CaloScaleNoiseConfig.parser
parser
Definition: CaloScaleNoiseConfig.py:75
SCT_ID.h
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
ExpandedIdentifier
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:102
master.gen
gen
Definition: master.py:32
ITkStripCabling::OnlineIdGenerator
Definition: OnlineIdGenerator.h:26
IdDictMgr
Definition: IdDictDefs.h:32
IdDictParser.h
lumiFormat.i
int i
Definition: lumiFormat.py:85
file
TFile * file
Definition: tile_monitor.h:29
IdDictParser
Definition: IdDictParser.h:12
OnlineIdGenerator.h
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
ITkStripCablingAlg.h
Fills an ITkStripCablingData object and records it in Storegate (based on ITkPixelCabling package)
main
int main()
Definition: ProduceDummyStripCabling.cxx:19
AthenaPoolExample_Copy.outputFileName
string outputFileName
Definition: AthenaPoolExample_Copy.py:40