8 theFile =
new TFile(fileName.c_str(),
"update");
14 for(std::map<int, RootChamberWriter>::iterator mapItr = theChamberWriters.begin();
15 mapItr != theChamberWriters.end(); ++mapItr)
17 mapItr->second.tree()->Print();
19 theFile = mapItr->second.tree()->GetCurrentFile();
28 ostringstream treeName;
29 treeName <<
"ChamberType" << chamberType;
35 std::map<int, RootChamberWriter>::iterator mapItr = theChamberWriters.find(chamberType);
36 if(mapItr != theChamberWriters.end())
38 return mapItr->second;
42 throw cms::Exception(
"NeutronWriter") <<
"It's dangerous to create ROOT chamber " 43 <<
"writers during processing. The global file may change";
47 return theChamberWriters[chamberType];
54 std::cout <<
"ROOTNEUTRONWRITER " << chamberType <<
" HITS SIZE " << hits.size() <<std::endl;
55 chamberWriter(chamberType).write(hits);
virtual void initialize(int detType)
static AlgebraicMatrix initialize()
virtual void writeCluster(int chamberType, const edm::PSimHitContainer &hits)
writes out a list of SimHits.
virtual ~RootNeutronWriter()
RootNeutronWriter(const std::string &fileName)
RootChamberWriter & chamberWriter(int chamberType)
std::vector< PSimHit > PSimHitContainer