177 |
|
virtual void endJob (); |
178 |
|
|
179 |
|
FROG_Events* events; |
180 |
– |
FROG_Element_Base* events_prim; |
180 |
|
|
181 |
|
std::string OutputFile; |
183 |
– |
|
182 |
|
std::vector<InputTag> GenParticlesProducers; |
183 |
|
|
184 |
|
std::vector<InputTag> SimTrackProducers; |
814 |
|
delete CMS_Geom; |
815 |
|
} |
816 |
|
|
817 |
< |
events_prim = new FROG_Element_Base(C_PRIMARY); |
820 |
< |
events = new FROG_Events(events_prim); |
817 |
> |
events = new FROG_Events(); |
818 |
|
} |
819 |
|
|
820 |
|
// ------------ method called once each job just after ending the event loop ------------ |
827 |
|
if(NEventsInVisFile>=0)sprintf(OutputFileName,"%s_Run%i_1stEvent%08i",OutputFileName,SRun,SEvent); |
828 |
|
sprintf(OutputFileName,"%s.vis",OutputFileName); |
829 |
|
|
830 |
< |
// FROG_Events* events = new FROG_Events(events_prim); |
834 |
< |
events->Save((char*) OutputFileName, CompressFiles); |
830 |
> |
events->SaveInLive((char*) OutputFileName, true, CompressFiles); |
831 |
|
delete events; |
836 |
– |
delete events_prim; |
837 |
– |
|
838 |
– |
// events_prim = new FROG_Element_Base(C_PRIMARY); |
832 |
|
NEvents=0; |
833 |
|
} |
834 |
|
} |
850 |
|
|
851 |
|
|
852 |
|
FROG_Element_Event* event = new FROG_Element_Event(iEvent.id().run(), iEvent.id().event(), iEvent.time().value() ); |
853 |
< |
events_prim->addDaughter(event); |
853 |
> |
events->AddEvent(event); |
854 |
|
|
855 |
|
// access the tracker |
856 |
|
edm::ESHandle<TrackerGeometry> tkGeom; |
1003 |
|
|
1004 |
|
|
1005 |
|
// ### SiStrip Clusters ### |
1006 |
< |
FROG_Element_Base_With_DetId_And_Name* frogSSTHit = new FROG_Element_Base_With_DetId_And_Name( EVTID_SISTRIPHIT, "SiStrip Clusters"); |
1006 |
> |
FROG_Element_Base_With_DetId_And_Name* frogSSTHit = new FROG_Element_Base_With_DetId_And_Name( EVTID_SISTRIPCLUSTER, "SiStrip Clusters"); |
1007 |
|
frogLowReco->addDaughter(frogSSTHit); |
1008 |
|
for(unsigned int i=0;i<SiStripClusterProducers.size();i++){ |
1009 |
|
edm::Handle<edmNew::DetSetVector<SiStripCluster> > h_Sst_Hits; |
1011 |
|
const edmNew::DetSetVector<SiStripCluster>& Sst_Hits = *h_Sst_Hits.product(); |
1012 |
|
|
1013 |
|
|
1014 |
< |
FROG_Element_Base_With_DetId_And_Name* frogSstHitColl = new FROG_Element_Base_With_DetId_And_Name( EVTID_SISTRIPHIT + i + 1, SiStripClusterProducers[i].encode().c_str()); |
1014 |
> |
FROG_Element_Base_With_DetId_And_Name* frogSstHitColl = new FROG_Element_Base_With_DetId_And_Name( EVTID_SISTRIPCLUSTER + i + 1, SiStripClusterProducers[i].encode().c_str()); |
1015 |
|
frogSSTHit->addDaughter(frogSstHitColl); |
1016 |
|
|
1017 |
|
|
1041 |
|
Surface::GlobalPoint Pos = DetUnit->surface().toGlobal( LocalPoint(XPos, 0, 0) ); |
1042 |
|
|
1043 |
|
|
1044 |
< |
FROG_Element_Event_Hit_SiStrip* frogStripHit = new FROG_Element_Event_Hit_SiStrip(iCluster->geographicalId(), iCluster->firstStrip(), Pitch); |
1045 |
< |
for(unsigned int i=0;i<iCluster->amplitudes().size();i++){frogStripHit->Ampl_.push_back(iCluster->amplitudes()[i]);} |
1046 |
< |
frogSstHitColl->addDaughter(frogStripHit); |
1044 |
> |
FROG_Element_Event_Cluster_SiStrip* frogStripClust = new FROG_Element_Event_Cluster_SiStrip(iCluster->geographicalId(), iCluster->firstStrip(), Pitch); |
1045 |
> |
for(unsigned int i=0;i<iCluster->amplitudes().size();i++){frogStripClust->Ampl_.push_back(iCluster->amplitudes()[i]);} |
1046 |
> |
frogSstHitColl->addDaughter(frogStripClust); |
1047 |
|
}} |
1048 |
|
|
1049 |
|
} |
1427 |
|
sprintf(OutputFileName,"%s",OutputFile.substr(0,OutputFile.size()-4).c_str()); |
1428 |
|
if(NEventsInVisFile>0)sprintf(OutputFileName,"%s_Run%i_1stEvent%08i",OutputFileName,SRun,SEvent); |
1429 |
|
sprintf(OutputFileName,"%s.vis",OutputFileName); |
1430 |
< |
events->SaveInLive((char*) OutputFileName, (unsigned int)-1); |
1430 |
> |
events->SaveInLive((char*) OutputFileName, false, CompressFiles, (unsigned int)-1); |
1431 |
|
|
1432 |
|
if(NEvents == NEventsInVisFile){ |
1433 |
< |
delete events; |
1441 |
< |
delete events_prim; |
1433 |
> |
events->SaveInLive((char*) OutputFileName, true, CompressFiles, (unsigned int)-1); |
1434 |
|
|
1435 |
< |
events_prim = new FROG_Element_Base(C_PRIMARY); |
1436 |
< |
events = new FROG_Events(events_prim); |
1435 |
> |
delete events; |
1436 |
> |
events = new FROG_Events(); |
1437 |
|
NEvents=0; |
1446 |
– |
|
1447 |
– |
#ifdef FROG_ZLIB |
1448 |
– |
if(CompressFiles){ |
1449 |
– |
FROG_ZLIB_Deflate(OutputFileName); |
1450 |
– |
} |
1451 |
– |
#endif |
1438 |
|
} |
1439 |
|
} |
1440 |
|
|