DTCompactMapWriter

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
#ifndef DTCompactMapWriter_H
#define DTCompactMapWriter_H
/** \class DTCompactMapWriter
 *
 *  Description:
 *       Class to build readout maps from map templates and lists
 *
 *  $Date: 2009/03/19 12:00:00 $
 *  $Revision: 1.1 $
 *  \author Paolo Ronchese INFN Padova
 *
 */

//----------------------
// Base Class Headers --
//----------------------

//------------------------------------
// Collaborating Class Declarations --
//------------------------------------
class DTROBCardId;
class DTROBCardCompare;
class DTTDCChannelId;
class DTTDCChannelCompare;
class DTPhysicalWireId;
class DTPhysicalWireCompare;
class DTROSChannelId;
class DTROSChannelCompare;

//---------------
// C++ Headers --
//---------------
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <iostream>
#include <fstream>

class DTCompactMapWriter {
public:
  static void buildSteering(std::istream& jobDesc);

private:
  static void fillTDCMap(const std::string& map_file,
                         int wheel,
                         int sector,
                         std::map<DTROBCardId, int, DTROBCardCompare>& tdc_idm,
                         int stationId,  // int robId,
                         int map_count,
                         bool& write);
  static void fillROSMap(const std::string& map_file,
                         int ddu,
                         int ros,
                         int whdef,
                         int secdef,
                         std::map<DTROSChannelId, DTROBCardId, DTROSChannelCompare>& ddu_map,
                         std::map<DTROSChannelId, DTROBCardId, DTROSChannelCompare>& ros_map,
                         int map_count,
                         bool& write);
  static void cloneROS(std::map<DTROSChannelId, DTROBCardId, DTROSChannelCompare>& ros_m,
                       std::map<DTROSChannelId, DTROBCardId, DTROSChannelCompare>& ros_a,
                       int ddu_o,
                       int ros_o,
                       int ddu_f,
                       int ros_f);
  static void appendROS(std::map<DTROSChannelId, DTROBCardId, DTROSChannelCompare>& ros_m,
                        std::map<DTROSChannelId, DTROBCardId, DTROSChannelCompare>& ros_a);
  static void fillReadOutMap(int ros_count,
                             std::map<DTROBCardId, int, DTROBCardCompare>& tdc_idm,
                             std::map<DTROSChannelId, DTROBCardId, DTROSChannelCompare>& ddu_map,
                             std::map<DTROSChannelId, DTROBCardId, DTROSChannelCompare>& ros_map);
};

#endif