CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Private Attributes

rpcdqmclient::clientTools Class Reference

#include <clientTools.h>

List of all members.

Public Member Functions

std::vector< MonitorElement * > constructMEVector (const edm::EventSetup &iSetup, const std::string &prefixDir, const std::string &MEName, DQMStore *dbe)
std::vector< RPCDetIdgetAssociatedRPCdetId ()

Protected Member Functions

void getMEs (const edm::EventSetup &iSetup, const std::string &prefixDir, const std::string &MEName, DQMStore *dbe)

Private Attributes

std::vector< RPCDetIdmyDetIds_
std::vector< MonitorElement * > myMeVect_
std::vector< std::string > myRollNames_

Detailed Description

Definition at line 20 of file clientTools.h.


Member Function Documentation

std::vector<MonitorElement*> rpcdqmclient::clientTools::constructMEVector ( const edm::EventSetup iSetup,
const std::string &  prefixDir,
const std::string &  MEName,
DQMStore dbe 
) [inline]

Definition at line 23 of file clientTools.h.

References gather_cfg::cout, getMEs(), and myMeVect_.

                                                                                                                                                  {
    cout<<"Starting ConstructMEVector"<<endl;
    this->getMEs(iSetup, prefixDir,  MEName, dbe);

    return      myMeVect_;
  }
std::vector<RPCDetId> rpcdqmclient::clientTools::getAssociatedRPCdetId ( ) [inline]

Definition at line 30 of file clientTools.h.

References myDetIds_, and myMeVect_.

                                              {
    std::vector<RPCDetId> myVector; 
    myVector.clear();

    if (myMeVect_.size() !=0 && myMeVect_.size()==myDetIds_.size() ) myVector= myDetIds_;

    return myVector;
  }
void rpcdqmclient::clientTools::getMEs ( const edm::EventSetup iSetup,
const std::string &  prefixDir,
const std::string &  MEName,
DQMStore dbe 
) [inline, protected]

Definition at line 42 of file clientTools.h.

References RPCBookFolderStructure::folderStructure(), edm::EventSetup::get(), DQMStore::get(), myDetIds_, myMeVect_, myRollNames_, RPCGeomServ::name(), csvReporter::r, and RPCChamber::rolls().

Referenced by constructMEVector().

                                                                                                                  {


 
    edm::ESHandle<RPCGeometry> rpcGeo;
    iSetup.get<MuonGeometryRecord>().get(rpcGeo);
 
    //loop on all geometry and get all histos
    for (TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();it<rpcGeo->dets().end();it++){
      if( dynamic_cast< RPCChamber* >( *it ) != 0 ){
 
        RPCChamber* ch = dynamic_cast< RPCChamber* >( *it ); 
        std::vector< const RPCRoll*> roles = (ch->rolls());
        //Loop on rolls in given chamber
        for(std::vector<const RPCRoll*>::const_iterator r = roles.begin();r != roles.end(); ++r){
          RPCDetId detId = (*r)->id();
        
          //Get Occupancy ME for roll
          RPCGeomServ RPCname(detId);      
          RPCBookFolderStructure *  folderStr = new RPCBookFolderStructure();
          MonitorElement * myMe = dbe->get(prefixDir+"/"+ folderStr->folderStructure(detId)+"/"+MEName+ "_"+RPCname.name()); 
          if (!myMe)continue;

          myMeVect_.push_back(myMe);
          myDetIds_.push_back(detId);
          myRollNames_.push_back(RPCname.name());

        }
      }
    }//end loop on all geometry and get all histos  
  }

Member Data Documentation

Definition at line 78 of file clientTools.h.

Referenced by getAssociatedRPCdetId(), and getMEs().

Definition at line 77 of file clientTools.h.

Referenced by constructMEVector(), getAssociatedRPCdetId(), and getMEs().

std::vector<std::string> rpcdqmclient::clientTools::myRollNames_ [private]

Definition at line 79 of file clientTools.h.

Referenced by getMEs().