CMS 3D CMS Logo

XMLZeroSuppression.h

Go to the documentation of this file.
00001 #ifndef HCALConfigDBTools_XMLTools_XMLZeroSuppression_h
00002 #define HCALConfigDBTools_XMLTools_XMLZeroSuppression_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     XMLTools
00006 // Class  :     XMLZeroSuppression
00007 // 
00016 //
00017 // Original Author:  Gena Kukartsev, kukarzev@fnal.gov
00018 //         Created:  Tue Oct 23 14:30:33 CDT 2007
00019 // $Id: XMLZeroSuppression.h,v 1.1 2008/02/12 17:02:00 kukartse Exp $
00020 //
00021 
00022 // system include files
00023 #include<map>
00024 
00025 // user include files
00026 #include "CaloOnlineTools/HcalOnlineDb/interface/XMLDOMBlock.h"
00027 #include "CaloOnlineTools/HcalOnlineDb/interface/XMLProcessor.h"
00028 
00029 // forward declarations
00030 
00031 class ZeroSuppressionID
00032 {
00033  public:
00034   ZeroSuppressionID(){};
00035   ~ZeroSuppressionID(){};
00036   int crate;
00037   int slot;
00038   int topbottom;
00039   int fiber;
00040 
00041   bool operator<(const ZeroSuppressionID & _id) const
00042     {
00043       if ( crate < _id . crate ) return true;
00044       else if ( crate == _id . crate && slot < _id . slot ) return true;
00045       else if ( crate == _id . crate && slot == _id . slot && topbottom < _id . topbottom ) return true;
00046       else if ( crate == _id . crate && slot == _id . slot && topbottom == _id . topbottom && fiber < _id . fiber ) return true;
00047       else return false;
00048     }
00049 
00050  private:
00051 
00052 };
00053 
00054 class XMLZeroSuppression : public XMLDOMBlock
00055 {
00056   
00057  public:
00058   
00059   typedef struct _loaderBaseConfig : public XMLProcessor::loaderBaseConfig
00060   {
00061 
00062   } loaderBaseConfig;
00063   
00064   typedef struct _ZeroSuppressionConfig
00065   {
00066     _ZeroSuppressionConfig();
00067     string CFGBrickSet;
00068     int crate;
00069     int slot;
00070     int topbottom;
00071     int fiber;
00072     int generalizedindex;
00073     string creationtag;
00074     string creationstamp;
00075     string pattern_spec_name;
00076   } ZeroSuppressionConfig;
00077   
00078   XMLZeroSuppression();
00079   XMLZeroSuppression( string templateBase );
00080   virtual ~XMLZeroSuppression();
00081   
00082   // ---------- const member functions ---------------------
00083   
00084   // ---------- static member functions --------------------
00085   
00086   // ---------- member functions ---------------------------
00087   int addPattern( ZeroSuppressionConfig * config,
00088               string templateFileName = "HCAL_HTR_DATA_PATTERNS.brickset.template" );
00089   int createByCrate( void );
00090 
00091  private:
00092   XMLZeroSuppression(const XMLZeroSuppression&); // stop default
00093   
00094   const XMLZeroSuppression& operator=(const XMLZeroSuppression&); // stop default
00095   
00096   int fillPatternInfo( const ZeroSuppressionConfig & );
00097 
00098   // ---------- member data --------------------------------
00099   map< ZeroSuppressionID, int > configByCrate;
00100 
00101   string data_elements;
00102 };
00103 
00104 
00105 #endif

Generated on Tue Jun 9 17:25:56 2009 for CMSSW by  doxygen 1.5.4