CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/CalibFormats/CastorObjects/interface/CastorText2DetIdConverter.h

Go to the documentation of this file.
00001 #ifndef CASTORTEXT2DETIDCONVERTER_H
00002 #define CASTORTEXT2DETIDCONVERTER_H
00003 
00009 #include <string>
00010 #include "DataFormats/DetId/interface/DetId.h"
00011 
00012 class CastorText2DetIdConverter {
00013  public:
00014 
00015   CastorText2DetIdConverter (const std::string& fFlavor = "NA", const std::string& fField1 = "0",
00016                           const std::string& fField2 = "0", const std::string& fField3 = "0");
00017   
00018   CastorText2DetIdConverter (DetId fId);
00019 
00020   //  bool isHcalDetId () const;
00021   bool isHcalCastorDetId () const;
00022 
00023   const std::string& getFlavor () const {return flavorName;}
00024   const std::string& getField1 () const {return field1;}
00025   const std::string& getField2 () const {return field2;}
00026   const std::string& getField3 () const {return field3;}
00027   DetId getId () const {return mId;}
00028   int getField (int i) const;
00029   std::string toString () const;
00030   
00031  private:
00032   bool init (const std::string& fFlavor, const std::string& fField1,
00033              const std::string& fField2, const std::string& fField3);
00034   bool init (DetId fId);
00035   void setField (int i, int fValue);
00036   std::string flavorName;
00037   std::string field1;
00038   std::string field2;
00039   std::string field3;
00040   DetId mId;
00041 };
00042 
00043 #endif