BDTestDataModuleImp Class Reference

List of all members.

Public Member Functions

 BDTestDataModuleImp (string output)
 ~BDTestDataModuleImp ()
void Fill (const RawBeamMonBlock &block, const RawBeamMonHeaderBlock &head)

Private Attributes

TFile * outfile
TTree * outtree
BDTestDatabdtd
string output_file

Detailed Description

Definition at line 24 of file BDTestDataModule.cxx.


Constructor & Destructor Documentation

BDTestDataModuleImp::BDTestDataModuleImp ( string  output  )  [inline]

Definition at line 31 of file BDTestDataModule.cxx.

References bdtd, outfile, output_file, and outtree.

00032         : outfile(0)
00033         , outtree(0)
00034         , bdtd(0)
00035         , output_file(output) 
00036     {
00037         cerr << "Starting output file: " << output_file << endl;
00038         outfile = new TFile(output_file.c_str(),"RECREATE");
00039         outtree = new TTree("bdtest", "Beam Monitoring Data");
00040         bdtd = new BDTestData;
00041         outtree->Branch("pot","BDTestData",&bdtd);
00042         cerr << "Bdtd at " << (void*)bdtd << endl;
00043     }

BDTestDataModuleImp::~BDTestDataModuleImp (  )  [inline]

Definition at line 44 of file BDTestDataModule.cxx.

References bdtd, outfile, output_file, and outtree.

00044                            {
00045         cerr << "~BDTestDataModuleImp() \n";
00046         outfile->cd();
00047         outtree->Write();
00048         outfile->Close();
00049         delete outfile;
00050         //delete outtree;
00051         delete bdtd;
00052         outfile = 0;
00053         outtree = 0;
00054         bdtd = 0;
00055         cerr << output_file << " written\n";
00056     }


Member Function Documentation

void BDTestDataModuleImp::Fill ( const RawBeamMonBlock block,
const RawBeamMonHeaderBlock head 
) [inline]

Definition at line 58 of file BDTestDataModule.cxx.

References bdtd, fill_bdtest(), and outtree.

Referenced by BDTestDataModule::Reco().

00059     {
00060         if (fill_bdtest(*bdtd,block,head))
00061             outtree->Fill();
00062     }


Member Data Documentation

Definition at line 27 of file BDTestDataModule.cxx.

Referenced by BDTestDataModuleImp(), Fill(), and ~BDTestDataModuleImp().

TFile* BDTestDataModuleImp::outfile [private]

Definition at line 25 of file BDTestDataModule.cxx.

Referenced by BDTestDataModuleImp(), and ~BDTestDataModuleImp().

Definition at line 28 of file BDTestDataModule.cxx.

Referenced by BDTestDataModuleImp(), and ~BDTestDataModuleImp().

TTree* BDTestDataModuleImp::outtree [private]

Definition at line 26 of file BDTestDataModule.cxx.

Referenced by BDTestDataModuleImp(), Fill(), and ~BDTestDataModuleImp().


The documentation for this class was generated from the following file:

Generated on 18 Oct 2018 for loon by  doxygen 1.6.1