Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:29:12

0001 #ifndef Forward_TotemNumberMerger_h
0002 #define Forward_TotemNumberMerger_h 1
0003 // -*- C++ -*-
0004 //
0005 // Package:     Forward
0006 // Class  :     TotemNumberMerger
0007 //
0008 /**\class TotemNumberMerger TotemNumberMerger.h SimG4CMS/Forward/interface/TotemNumberMerger.h
0009  
0010  Description: Takes two integers and merges them together in only an integer!
0011               It's also possible the opposite operation.
0012  
0013  Usage:
0014     Used in TotemOrganizations to get unique ID of sensitive detector element
0015  
0016 */
0017 //
0018 // Original Author:  R. Capra
0019 //         Created:  Tue May 16 10:14:34 CEST 2006
0020 //
0021 
0022 // system include files
0023 
0024 // user include files
0025 
0026 #include "globals.hh"
0027 
0028 class TotemNumberMerger {
0029 public:
0030   // ---------- Constructor and destructor -----------------
0031   TotemNumberMerger();
0032   ~TotemNumberMerger();
0033 
0034   // ---------- The two operations -------------------------
0035   unsigned long Merge(unsigned long value1, unsigned long value2) const;
0036   unsigned long Merge(unsigned long value1, unsigned long value2, unsigned long value3) const;
0037   unsigned long Merge(unsigned long value1, unsigned long value2, unsigned long value3, unsigned long value4) const;
0038   void Split(unsigned long source, unsigned long &value1, unsigned long &value2) const;
0039   void Split(unsigned long source, unsigned long &value1, unsigned long &value2, unsigned long &value3) const;
0040   void Split(unsigned long source,
0041              unsigned long &value1,
0042              unsigned long &value2,
0043              unsigned long &value3,
0044              unsigned long &value4) const;
0045 };
0046 #endif