Logo ROOT   6.18/05
Reference Guide
MPCode.h
Go to the documentation of this file.
1/* @(#)root/multiproc:$Id$ */
2// Author: Enrico Guiraud July 2015
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_MPCode
13#define ROOT_MPCode
14
15/////////////////////////////////////////////////////////////////////////
16/// This namespace prevents conflicts between MPCode::kError and
17/// ELogLevel::kError
18namespace MPCode {
19
20 //////////////////////////////////////////////////////////////////////////
21 ///
22 /// An enumeration of the message codes handled by TProcessExecutor,
23 /// TTreeProcessorMP, TMPWorker, TMPWorkerTree and by the low level
24 /// classes TMPClient and TMPWorker.
25 ///
26 //////////////////////////////////////////////////////////////////////////
27
28 enum EMPCode : unsigned {
29 //not an enum class because we want to be able to easily cast back and forth from unsigned
30 /* TProcessExecutor::Map */
31 kExecFunc = 0, ///< Execute function without arguments
32 kExecFuncWithArg, ///< Execute function with the argument contained in the message
33 kFuncResult, ///< The message contains the result of a function execution
34 /* TProcessExecutor::MapReduce */
35 kIdling = 100, ///< We are ready for the next task
36 kSendResult, ///< Ask for a kFuncResult/kProcResult
37 /* TTreeProcessorMP::Process */
38 kProcFile = 200, ///< Tell a TMPWorkerTree which tree to process. The object sent is a TreeInfo
39 kProcRange, ///< Tell a TMPWorkerTree which tree and entries range to process. The object sent is a TreeRangeInfo
40 kProcTree, ///< Tell a TMPWorkerTree to process the tree that was passed to it at construction time
41 kProcSelector, ///< Tell a TMPWorkerTree to process the tree using the selector passed to it at construction time
42 kProcResult, ///< The message contains the result of the processing of a TTree
43 kProcEnded, ///< Tell the client we are done processing (i.e. we have reached the target number of entries to process)
44 kProcError, ///< Tell the client there was an error while processing
45 /* Generic messages, including errors */
46 kMessage = 1000, ///< Generic message
47 kError, ///< Error message
48 kFatalError, ///< Fatal error: whoever sends this message is terminating execution
49 kShutdownOrder, ///< Used by the client to tell servers to shutdown
50 kShutdownNotice, ///< Used by the workers to notify client of shutdown
51 kRecvError ///< Error while reading from the socket
52 };
53}
54
55#endif
This namespace prevents conflicts between MPCode::kError and ELogLevel::kError.
Definition: MPCode.h:18
EMPCode
An enumeration of the message codes handled by TProcessExecutor, TTreeProcessorMP,...
Definition: MPCode.h:28
@ kSendResult
Ask for a kFuncResult/kProcResult.
Definition: MPCode.h:36
@ kMessage
Generic message.
Definition: MPCode.h:46
@ kProcFile
Tell a TMPWorkerTree which tree to process. The object sent is a TreeInfo.
Definition: MPCode.h:38
@ kRecvError
Error while reading from the socket.
Definition: MPCode.h:51
@ kIdling
We are ready for the next task.
Definition: MPCode.h:35
@ kError
Error message.
Definition: MPCode.h:47
@ kProcSelector
Tell a TMPWorkerTree to process the tree using the selector passed to it at construction time.
Definition: MPCode.h:41
@ kFuncResult
The message contains the result of a function execution.
Definition: MPCode.h:33
@ kProcRange
Tell a TMPWorkerTree which tree and entries range to process. The object sent is a TreeRangeInfo.
Definition: MPCode.h:39
@ kExecFuncWithArg
Execute function with the argument contained in the message.
Definition: MPCode.h:32
@ kFatalError
Fatal error: whoever sends this message is terminating execution.
Definition: MPCode.h:48
@ kShutdownOrder
Used by the client to tell servers to shutdown.
Definition: MPCode.h:49
@ kProcTree
Tell a TMPWorkerTree to process the tree that was passed to it at construction time.
Definition: MPCode.h:40
@ kProcError
Tell the client there was an error while processing.
Definition: MPCode.h:44
@ kProcEnded
Tell the client we are done processing (i.e. we have reached the target number of entries to process)
Definition: MPCode.h:43
@ kExecFunc
Execute function without arguments.
Definition: MPCode.h:31
@ kProcResult
The message contains the result of the processing of a TTree.
Definition: MPCode.h:42
@ kShutdownNotice
Used by the workers to notify client of shutdown.
Definition: MPCode.h:50