First page Back Continue Last page Overview Graphics
SimpleAnalysisMaker.cxx
ClassImp(SimpleAnalysisMaker) // Macro for CINT compatibility
SimpleAnalysisMaker::SimpleAnalysisMaker( StMuDstMaker* maker ) : StMaker()
{
for ( Int_t i = 0 ; i < NumberOfTH1F ; i++ ) { histogram[i] = NULL ; }
mMuDstMaker = maker ; // Pass MuDst pointer
histogram_output = NULL ; // Zero the Pointer to output file
mEventsProcessed = 0 ; // Zero the Number of Events
mHistogramOutputFileName = "" ; // Histogram Output File Name
}
Int_t SimpleAnalysisMaker::Init( )
{
histogram_output = new TFile( mHistogramOutputFileName, "recreate" ) ;
const Int_t nbins = 100 ;
histogram[0] = new TH1F( "Vertex", "Vertex Z Position", nbins, -25.0, 25.0 ) ;
histogram[1] = new TH1F( "Pt", "Transverse Momentum", nbins, 0, 10 ) ;
return kStOK ;
}
Int_t SimpleAnalysisMaker::Finish( )
{
histogram_output -> Write() ;
cout << "Total Events Processed in DstMaker " << mEventsProcessed << endl ;
return kStOk ;
}