ROOT logo
//-*- Mode: C++ -*-
// $Id$

#ifndef ALIHLTOUTHANDLERDETECTORDDL_H
#define ALIHLTOUTHANDLERDETECTORDDL_H
//* This file is property of and copyright by the                          * 
//* ALICE Experiment at CERN, All rights reserved.                         *
//* See cxx source for full Copyright notice                               *

/// @file   AliHLTOUTHandlerDetectorDDL.h
/// @author Matthias Richter
/// @date   2008-09-09
/// @brief  Default HLTOUT handler returning equipment id from data type and
///         bit pattern in spec.

#include "AliHLTOUTHandlerEquId.h"

/**
 * @class AliHLTOUTHandlerDetectorDDL
 * A default handler class for DDL raw data redirection handlers.
 *
 * This class implements an AliHLTOUTHandlerEquId which extracts the
 * equipment Id from the bit pattern in the specification. All detectors
 * with up to 32 DDL links follow this convention. The bit no in the
 * data specification word corresponds to the DDL number within the
 * sub-detector.
 *
 * DDL offsets for sub-detectors can be fetched by means of AliDAQ.
 * The class must be initialized with the detector identification and the
 * data type it should be used for. 
 * @note The detector identification is according to AliDAQ. E.g. for ITS
 * and MUON there are ITSSPD, ITSSDD, ITSSSD, and MUONTRK and MUONTRG
 * respectively.
 *
 * @ingroup alihlt_aliroot_reconstruction
 */
class AliHLTOUTHandlerDetectorDDL : public AliHLTOUTHandlerEquId {
 public:
  /** constructor 
   * the class is initialized with the detector identification and the
   * data type it should be used for. Note: the detector identification
   * is according to AliDAQ. E.g. for ITS and MUON there are ITSSPD,
   * ITSSDD, ITSSSD, and MUONTRK and MUONTRG respectively.
   */
  AliHLTOUTHandlerDetectorDDL(const char* detector, AliHLTComponentDataType dt);
  /** standard destructor */
  virtual ~AliHLTOUTHandlerDetectorDDL();

  /**
   * Process a data block.
   * Derives the eqipment ID from the DDL offset of the detector and
   * the DDL no within the detector which corresponds to a bit in the
   * data specification. Only one bit is allowed to be set.
   * @return equipment id the block should be used for.
   */
  virtual int ProcessData(AliHLTOUT* pData);

 private:
  /** standard constructor prohibited */
  AliHLTOUTHandlerDetectorDDL();
  /** copy constructor prohibited */
  AliHLTOUTHandlerDetectorDDL(const AliHLTOUTHandlerDetectorDDL&);
  /** assignment operator prohibited */
  AliHLTOUTHandlerDetectorDDL& operator=(const AliHLTOUTHandlerDetectorDDL&);

  int fDDLOffset; //!transient
  int fNumberOfDDLs; //!transient
  AliHLTComponentDataType fDt; //!transient

  ClassDef(AliHLTOUTHandlerDetectorDDL, 0)
};
#endif
 AliHLTOUTHandlerDetectorDDL.h:1
 AliHLTOUTHandlerDetectorDDL.h:2
 AliHLTOUTHandlerDetectorDDL.h:3
 AliHLTOUTHandlerDetectorDDL.h:4
 AliHLTOUTHandlerDetectorDDL.h:5
 AliHLTOUTHandlerDetectorDDL.h:6
 AliHLTOUTHandlerDetectorDDL.h:7
 AliHLTOUTHandlerDetectorDDL.h:8
 AliHLTOUTHandlerDetectorDDL.h:9
 AliHLTOUTHandlerDetectorDDL.h:10
 AliHLTOUTHandlerDetectorDDL.h:11
 AliHLTOUTHandlerDetectorDDL.h:12
 AliHLTOUTHandlerDetectorDDL.h:13
 AliHLTOUTHandlerDetectorDDL.h:14
 AliHLTOUTHandlerDetectorDDL.h:15
 AliHLTOUTHandlerDetectorDDL.h:16
 AliHLTOUTHandlerDetectorDDL.h:17
 AliHLTOUTHandlerDetectorDDL.h:18
 AliHLTOUTHandlerDetectorDDL.h:19
 AliHLTOUTHandlerDetectorDDL.h:20
 AliHLTOUTHandlerDetectorDDL.h:21
 AliHLTOUTHandlerDetectorDDL.h:22
 AliHLTOUTHandlerDetectorDDL.h:23
 AliHLTOUTHandlerDetectorDDL.h:24
 AliHLTOUTHandlerDetectorDDL.h:25
 AliHLTOUTHandlerDetectorDDL.h:26
 AliHLTOUTHandlerDetectorDDL.h:27
 AliHLTOUTHandlerDetectorDDL.h:28
 AliHLTOUTHandlerDetectorDDL.h:29
 AliHLTOUTHandlerDetectorDDL.h:30
 AliHLTOUTHandlerDetectorDDL.h:31
 AliHLTOUTHandlerDetectorDDL.h:32
 AliHLTOUTHandlerDetectorDDL.h:33
 AliHLTOUTHandlerDetectorDDL.h:34
 AliHLTOUTHandlerDetectorDDL.h:35
 AliHLTOUTHandlerDetectorDDL.h:36
 AliHLTOUTHandlerDetectorDDL.h:37
 AliHLTOUTHandlerDetectorDDL.h:38
 AliHLTOUTHandlerDetectorDDL.h:39
 AliHLTOUTHandlerDetectorDDL.h:40
 AliHLTOUTHandlerDetectorDDL.h:41
 AliHLTOUTHandlerDetectorDDL.h:42
 AliHLTOUTHandlerDetectorDDL.h:43
 AliHLTOUTHandlerDetectorDDL.h:44
 AliHLTOUTHandlerDetectorDDL.h:45
 AliHLTOUTHandlerDetectorDDL.h:46
 AliHLTOUTHandlerDetectorDDL.h:47
 AliHLTOUTHandlerDetectorDDL.h:48
 AliHLTOUTHandlerDetectorDDL.h:49
 AliHLTOUTHandlerDetectorDDL.h:50
 AliHLTOUTHandlerDetectorDDL.h:51
 AliHLTOUTHandlerDetectorDDL.h:52
 AliHLTOUTHandlerDetectorDDL.h:53
 AliHLTOUTHandlerDetectorDDL.h:54
 AliHLTOUTHandlerDetectorDDL.h:55
 AliHLTOUTHandlerDetectorDDL.h:56
 AliHLTOUTHandlerDetectorDDL.h:57
 AliHLTOUTHandlerDetectorDDL.h:58
 AliHLTOUTHandlerDetectorDDL.h:59
 AliHLTOUTHandlerDetectorDDL.h:60
 AliHLTOUTHandlerDetectorDDL.h:61
 AliHLTOUTHandlerDetectorDDL.h:62
 AliHLTOUTHandlerDetectorDDL.h:63
 AliHLTOUTHandlerDetectorDDL.h:64
 AliHLTOUTHandlerDetectorDDL.h:65
 AliHLTOUTHandlerDetectorDDL.h:66
 AliHLTOUTHandlerDetectorDDL.h:67
 AliHLTOUTHandlerDetectorDDL.h:68
 AliHLTOUTHandlerDetectorDDL.h:69
 AliHLTOUTHandlerDetectorDDL.h:70
 AliHLTOUTHandlerDetectorDDL.h:71
 AliHLTOUTHandlerDetectorDDL.h:72