CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DumpFWTGeoRecoGeometry.cc
Go to the documentation of this file.
8 
9 #include "TGeoManager.h"
10 #include "TFile.h"
11 #include "TTree.h"
12 #include "TError.h"
13 #include "TSystem.h"
14 
16 {
17 public:
19  virtual ~DumpFWTGeoRecoGeometry( void ) {}
20 
21 private:
22  virtual void analyze( const edm::Event& event, const edm::EventSetup& eventSetup ) override;
23  virtual void beginJob( void ) override;
24  virtual void endJob( void ) override;
25 
28 };
29 
31  :m_tag( config.getUntrackedParameter<std::string>( "tagInfo", "unknown" )),
32  m_outputFileName( config.getUntrackedParameter<std::string>( "outputFileName", "cmsTGeoReco.root" ))
33 
34 {}
35 
36 void
38 {
39  using namespace edm;
40 
42  eventSetup.get<FWTGeoRecoGeometryRecord>().get( geoh );
43  TGeoManager *geom = geoh.product()->manager();//const_cast<TGeoManager*>( geoh.product()->manager());
44 
45  TFile file( m_outputFileName.c_str(), "RECREATE" );
46  file.WriteTObject( &*geom );
47  file.WriteTObject(new TNamed("CMSSW_VERSION", gSystem->Getenv( "CMSSW_VERSION" )));
48  file.WriteTObject(new TNamed("tag", m_tag.c_str()));
49  file.Close();
50 }
51 
52 void
54 {}
55 
56 void
58 {}
59 
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
virtual void beginJob(void) override
virtual void endJob(void) override
DumpFWTGeoRecoGeometry(const edm::ParameterSet &config)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
const T & get() const
Definition: EventSetup.h:56
virtual void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override