CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

myRawAna Class Reference

#include <myRawAna.h>

Inheritance diagram for myRawAna:
edm::EDAnalyzer

List of all members.

Public Member Functions

 myRawAna (const edm::ParameterSet &)

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
void beginJob ()
void endJob ()

Private Attributes

TH2F * fedSize
TH1F * totFedSize

Detailed Description

Definition at line 21 of file myRawAna.h.


Constructor & Destructor Documentation

myRawAna::myRawAna ( const edm::ParameterSet cfg)

Definition at line 31 of file myRawAna.cc.

                                             {
}

Member Function Documentation

void myRawAna::analyze ( const edm::Event evt,
const edm::EventSetup es 
) [private, virtual]

Implements edm::EDAnalyzer.

Definition at line 50 of file myRawAna.cc.

References gather_cfg::cout, edm::Event::getByLabel(), and i.

                                                                     {
  
  // **************************************************************
  // ** Access FED Information
  // **************************************************************


  edm::Handle<FEDRawDataCollection> theRaw;
  bool getFed = evt.getByLabel("source", theRaw);
  
  if ( ! getFed ) {
    std::cout << "fedRawData not available" << std::endl;
  } else { // got the fed raw data
    unsigned int totalFEDsize = 0 ; 
    
    // HCAL FEDs are 700-730
    unsigned int fedStart_ = 0;
    unsigned int fedStop_ = 900;
    
    for (unsigned int i=fedStart_; i<=fedStop_; ++i) {
      fedSize->Fill(i,theRaw->FEDData(i).size());
      totalFEDsize += theRaw->FEDData(i).size() ; 
    }
    totFedSize->Fill(totalFEDsize);
  }
  
  
}
void myRawAna::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 38 of file myRawAna.cc.

                          {

  edm::Service<TFileService> fs;

  fedSize = fs->make<TH2F>( "fedSize", "fedSize", 901, -0.5, 900.5, 20000, 0., 20000. );
  totFedSize = fs->make<TH1F>( "totFedSize", "totFedSize", 200, 0., 20000. );


}
void myRawAna::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 81 of file myRawAna.cc.

                      {

}

Member Data Documentation

TH2F* myRawAna::fedSize [private]

Definition at line 31 of file myRawAna.h.

TH1F* myRawAna::totFedSize [private]

Definition at line 32 of file myRawAna.h.